package Dynamique;
import org.omg.CORBA.Object;
import M2Naming.NameCoponent;
import M2Naming.NamingContextImp;
import M2Naming.NamingContextPackage.CannotProceed;
import M2Naming.NamingContextPackage.InvalidName;
import M2Naming.NamingContextPackage.NotFound;

public class InvoDynamiqueImp extends InvoDynamiquePOA {
	public Object Recherche(String name) {
		NamingContextImp ncm=new NamingContextImp();
		 NameCoponent nc = new NameCoponent(name,"");
		 NameCoponent path[] = {nc};
		Object obj=null;
		try {
			obj = ncm.resolve(path);
		} catch (NotFound e) {
			
			e.printStackTrace();
		} catch (CannotProceed e) {
			
			e.printStackTrace();
		} catch (InvalidName e) {
			
			e.printStackTrace();
		}
		return obj;
	}

}
